package com.xiaobao.mapper;

import com.xiaobao.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;


@Mapper
public interface UserMapper {

    // 查询所有用户
    User[] getAllUser();

    // 修改用户信息// 更新时清除缓存
    @Options(flushCache = Options.FlushCachePolicy.TRUE)
    boolean UpdateUser(User user);

    // 添加用户// 更新时清除缓存
    @Options(flushCache = Options.FlushCachePolicy.TRUE)
    boolean addUser(User user);

    // 删除用户 // 删除跟新时清除缓存
    @Options(flushCache = Options.FlushCachePolicy.TRUE)
    boolean deleteUser(String id);
}
